Machine Learning: Creating an End to End Solution For Absolute Beginners by Tull Shaun
Author:Tull, Shaun [Tull, Shaun]
Language: eng
Format: mobi
Publisher: Coolbullet Publishing
Published: 2018-10-08T16:00:00+00:00
4.7
KNN Hyperparameter Tuning
We will start by looking at the parameter value k for the KNN model, the optimal value for k needs to be identified. In our previous KNN model run, k had run with its default value of 5, to identify its optimal value, we will import the grid search cross validation library from scikit-learn, which is called ‘GridSearchCV’. Using the grid search which takes the parameters available from the KNN model we can now specify the range of values of k which we want to evaluate. We will set the range of k values from 1-31 and the model will evaluate each value of k against the full data set which will be divided into 10 folds, with an even distribution of the class in each fold. The result was measured and scored for accuracy. We can use a plot graph to help visualise the k value and its resulting accuracy, as shown in Plot 1.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Mikado Method by Ola Ellnestam Daniel Brolund(27094)
Hello! Python by Anthony Briggs(25950)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(25286)
Kotlin in Action by Dmitry Jemerov(24396)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(23591)
Dependency Injection in .NET by Mark Seemann(23313)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(21945)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(20849)
Grails in Action by Glen Smith Peter Ledbrook(19869)
Adobe Camera Raw For Digital Photographers Only by Rob Sheppard(17073)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(16833)
Secrets of the JavaScript Ninja by John Resig & Bear Bibeault(14464)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(12584)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(11865)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10650)
Hit Refresh by Satya Nadella(9239)
The Kubernetes Operator Framework Book by Michael Dame(8588)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8446)
Robo-Advisor with Python by Aki Ranin(8387)